package cloud.shyidong.tenant.commerce.controller;

import cloud.shyidong.commerce.dao.CommerceBannerDao;
import cloud.shyidong.commerce.entity.CommerceBannerEntity;
import cloud.shyidong.commerce.request.CommerceBannerInsertRequest;
import cloud.shyidong.commerce.request.CommerceBannerPageRequest;
import cloud.shyidong.commerce.request.CommerceBannerUpdateRequest;
import cloud.shyidong.core.controller.AbstractController;
import cloud.shyidong.core.request.LongIdRequest;
import cloud.shyidong.tenant.commerce.service.CommerceBannerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 轮播图控制器
 * </p>
 *
 * @author syd
 * @since 2023-08-24 15:55:11
 */
@RestController
@RequestMapping("/commerce-banner")
@Slf4j
public class CommerceBannerController extends AbstractController<CommerceBannerService, CommerceBannerDao, CommerceBannerEntity, LongIdRequest, CommerceBannerInsertRequest, CommerceBannerUpdateRequest, CommerceBannerPageRequest> {

//    @Override
//    @PostMapping(value = "/insert", consumes = {"application/json"})
//    public CommerceBannerEntity insert(@RequestBody @Valid CommerceBannerInsertRequest insertRequest) {
//        if (log.isDebugEnabled()) {
//            log.debug("save param >>> {}", JSON.toJSONString(insertRequest));
//        }
//        TenantContext tenantContext = TenantContextHolder.getTenantContext();
//        insertRequest.setTenantId(tenantContext.getTenantId());
//        return super.insert(insertRequest);
//    }
//
}

